﻿#include <iostream>
using namespace std;
class Person {
public:
    Person(std::string n): name(n) {
        std::cout << "gouzao: " << name << std::endl;
    }
    ~Person() {
        std::cout << "xigou: " << name << std::endl;
    }
private:
    std::string name;
};

int main() {
    Person* p = new Person("Alice");
    delete p;  // 调用析构函数，释放内存
    return 0;
}
